import Vue from 'vue'
import Router from 'vue-router'
import transit from '../components/transit.vue'
import home from '../components/home.vue'
import mapMonitoring from '../components/mapMonitoring.vue'
import history from '../components/history.vue'
import car from '../components/statistic/car.vue'
import personnel from '../components/statistic/personnel.vue'
import equipment from '../components/manage/equipment.vue'
import car_manage from '../components/manage/car_manage.vue'
import personnel_manage from '../components/manage/personnel_manage.vue'

//新增
import FireProtection from '../components/FireProtection.vue'
import realTime from '../components/realTime/realTime.vue'
import mapMonitorings from '../components/realTime/mapMonitoring.vue'

import demo from '../components/demo.vue'


Vue.use(Router)

export default new Router({
  mode: "history",
  linkActiveClass: 'link-active',
  routes: [
    { path: '/', redirect: { name: 'transit' } },
    {
      path: "/transit",
      name: "transit",
      component: transit
    },
    {
      path: "/demo",
      name: "demo",
      component: demo
    },
    {
      path: '/home',
      name: 'home',
      component: home,
      redirect: 'realTime',
      children: [
        {
          path: '/mapMonitoring',
          name: "mapMonitoring",
          component: mapMonitoring
        },
        {
          path: '/history',
          name: "history",
          component: history
        },
        {
          path: '/car',
          name: "car",
          component: car
        },
        {
          path: '/personnel',
          name: "personnel",
          component: personnel
        },
        {
          path: '/equipment',
          name: "equipment",
          component: equipment
        },
        {
          path: '/car_manage',
          name: "car_manage",
          component: car_manage
        },
        {
          path: '/personnel_manage',
          name: "personnel_manage",
          component: personnel_manage
        },
        {
          path: '/FireProtection',
          name: "FireProtection",
          component: FireProtection
        },
        {
          path: '/realTime',
          name: "realTime",
          component: realTime
        },
        {
          path: '/mapMonitorings',
          name: "mapMonitorings",
          component: mapMonitorings
        },
      ]
    }
  ]
})
